package com.neuedu.javase.thread;

/**
 * @auth 金山老师
 * title:   书籍代码
 * creatime: 2022-10-05 14:48
 * 描述 :
 */
public class MyThread extends Thread {

    public MyThread(String name) {
        super(name);
    }


    @Override
    public void run(){
        //子任务
        for (int i = 0; i < 10; i++) {
            System.out.println("MyThread i = " + i);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
